package com.indexingsystem.system.service;

import java.util.List;

import com.indexingsystem.boss.Vo.ResourceRelationsVo;
import com.indexingsystem.boss.Vo.ResourcesVo;
import com.indexingsystem.boss.common.PagedResult;
import com.indexingsystem.boss.entity.ResourceRelations;

public interface IResourceRelationsService {
	
	/**
	 * 根据资源关系id删除关系
	 * 
	 * @param resRelationId
	 * @return
	 */
	int deleteByPrimaryKey(String resRelationId) throws Exception;

	/**
	 * 新增资源关系
	 * 
	 * @param record
	 * @return
	 */
	int insertSelective(ResourceRelations record) throws Exception;

	/**
	 * 根据资源关系id查询
	 * 
	 * @param resRelationId
	 * @return
	 */
	ResourceRelations selectByPrimaryKey(String resRelationId);

	/**
	 * 更新资源关系
	 * 
	 * @param record
	 * @return
	 */
	int updateByPrimaryKeySelective(ResourceRelations record) throws Exception;

	/**
	 * 分页
	 * 
	 * @param ResourceRelationsVo
	 * @return
	 */
	PagedResult<ResourceRelationsVo> selectResourceRelationsList(ResourceRelationsVo ResourceRelationsVo);

	/**
	 * 分页
	 * 
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	PagedResult<ResourceRelationsVo> selectResourceRelationsList(Integer pageNo, Integer pageSize);

	/**
	 * 查询总数量
	 * 
	 * @return
	 */
	Integer getResourceRelationsListCount(ResourceRelationsVo resourceRelationsVo);

	/**
	 * 添加资源关系
	 * 
	 * @return
	 */
	Integer addResourceRelations(ResourcesVo firstVo,ResourcesVo secondVo) throws Exception;

	/**
	 * 移除资源关系
	 * 
	 * @return
	 */
	Integer removeResourceRelations(ResourceRelationsVo record) throws Exception;
	
	
	/**
	 * 通过资源id获取资源关系所有记录.
	 * @param resId
	 * @return
	 */
	List<ResourceRelations> getResourceRelationsListByResId(String resId);
}